home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Menu Grabber 1.3 folder.sit / Menu Grabber 1.3 folder / Menu Grabber 1.3 / Menu Grabber Help (text) < prev    next >
Text File  |  1996-03-07  |  22KB  |  558 lines

  1. Menu Grabber 1.3
  2.  
  3. March 6, 1996
  4.  
  5.  
  6.  
  7. Disclaimer and Copyright Notice
  8.  
  9.  
  10. Menu Grabber is a free utility which uses the Menu Events extension to
  11. control other applications through their menus.  The author, Ross Brown,
  12. makes no warranty, either express or implied, with respect to this
  13. software, its performance, merchantability, or suitability for any
  14. particular purpose.  People using the Menu Grabber utility do so at their
  15. own risk.  The author disclaims all liability for loss of data, mechanical
  16. damage, or other losses suffered while using the Menu Grabber utility.
  17.  
  18. Menu Grabber is an AWOL Software Production, Copyright ゥ 1994-6
  19. Ross Brown.  All rights reserved.  Permission is granted to make and
  20. distribute copies of this software, provided this disclaimer and copyright
  21. notice are preserved on all copies.  The software may not, however, be
  22. sold or distributed for profit, or included with other software which is
  23. sold or distributed for profit, without the permission of the author.
  24.  
  25. There are no site license fees for the use of Menu Grabber within an
  26. organization.  The author encourages you to make and distribute as many
  27. copies of the application as you wish, for whomever you wish, as long as
  28. it is not for profit.  Menu Grabber is part of a set of cooperating
  29. programs, AWOL Utilities.  The tutorial help you are reading is designed
  30. for handling by the help server application Help on Wheels, which is also
  31. part of AWOL Utilities.
  32.  
  33.  
  34.  
  35. Distribution Policy
  36.  
  37.  
  38. New versions of individual AWOL Utilities programs, including Menu
  39. Grabber, are available by anonymous FTP from popular archive sites
  40. including sumex-aim.stanford.edu, mac.archive.umich.edu, and their
  41. respective mirror sites, and through Usenet news group
  42. comp.binaries.mac.
  43.  
  44. Support for AWOL Utilities is through Internet mail at address
  45. ab026@freenet.carleton.ca.  The software is not available by FTP from
  46. this site.  The address for paper correspondence is AWOL Software
  47. Productions, PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada
  48. K2M 2C3.
  49.  
  50. Macintosh users who do not have access to electronic sources of free and
  51. shareware software may obtain a copy of AWOL Utilities by sending a
  52. self-addressed stamped envelope and an 800K (or larger) formatted
  53. diskette to the author at the above address.  U.S. users are reminded that
  54. postage from Canada in 1996 is C$0.52 up to 30 grams (1 oz.), C$0.77 up
  55. to 50 grams (1 3/4 oz.), and C$1.17 up to 100 grams (3 1/2 oz.).
  56. US$0.50, US$0.75, and US$1.00 in coin is acceptable in place of stamps
  57. for the respective weights.  People outside the U.S. and Canada may send
  58. an international postal reply coupon instead of Canadian stamps (available
  59. from any post office).  Please use sturdy envelopes, preferably cardboard
  60. disk mailers.  (Mailers over 5 mm (1/5") thick require C$1.17 postage to
  61. the U.S.)
  62. Please do not send return envelopes with non-Canadian
  63. stamps, as Canada Post will not accept them.
  64.  
  65.  
  66.  
  67. About AWOL Software Productions
  68.  
  69.  
  70. AWOL Software Productions specializes in custom development of
  71. software for the Mac OS.  Since its inception in 1990, AWOL has
  72. developed a number of programs which enhance the Mac OS user
  73. experience, working in nearly every part of the Macintosh Toolbox.  If
  74. you have a short-term programming task or product idea but lack the
  75. staff to do the expert design, coding, and documentation, we invite your
  76. inquiry.
  77.  
  78. Virtual Desktop is AWOLユs best-known effort, serving the desktop
  79. expansion needs of thousands of Mac users around the world.  Later in
  80. 1996, AWOL will release a new commercial version 2.0 to replace the
  81. freeware version contained in the AWOL Utilities package.  Please contact
  82. us at ab026@freenet.carleton.ca for feature and ordering information.
  83.  
  84. Users who want more out of the Macユs speech capabilities should check
  85. out MacYack Pro, a jointly developed package of speech tools marketed by
  86. Scantron Quality Computers (qualitycomp@aol.com; 20200 Nine Mile Rd.,
  87. St. Clair Shores, MI 48080).
  88.  
  89.  
  90.  
  91. Purpose
  92.  
  93.  
  94. As its name suggests, Menu Grabber reaches out to another application
  95. and grabs a copy of its menu bar.  When you select an item from a grabbed
  96. menu, or press its Command-key equivalent, Menu Grabber sends a
  97. メMenu eventモ to the target application, simulating a menu selection in
  98. that application.
  99.  
  100. The target application can be on your machine or on any machine on your
  101. AppleTalk network, but it must be a machine equipped with the Menu
  102. Events extension.  Any メhigh-level-event-awareモ application (one that
  103. supports program linking) can be a target, even if it is not designed to be
  104. scriptable.  With some limitations, Menu Grabber gives you a way to
  105. control applications on other machines which you would not otherwise
  106. have.
  107.  
  108. NOTE:  The help file for the Menu Events extension contains a complete
  109. description of the extension, the Apple events which it supports, and
  110. some usage suggestions for programmers.
  111.  
  112.  
  113.  
  114. Who Can Use Menu Grabber?
  115.  
  116.  
  117. Any Macintosh running System 7.0 or later can use Menu Grabber.
  118. Because itユs an application, and not a system extension, it shouldnユt
  119. conflict with your other programs.
  120.  
  121. It is not necessary to have the Menu Events extension installed on the
  122. machine where you use Menu Grabber to target applications on another
  123. machine.
  124.  
  125. Menu Grabber can be placed on an AppleShare file server, where any
  126. number of users can access it simultaneously.
  127.  
  128.  
  129.  
  130. How Does Menu Grabber Work?
  131.  
  132.  
  133. About Menu Events
  134.  
  135. When the Menu Events extension is installed on a Macintosh, all
  136. high-level-event-aware applications running on that machine gain support
  137. for Menu events.  Menu events are a class of Apple events which allow a
  138. sender to query an applicationユs menus and menu items, and to select its
  139. menu items.  (See the help file for the Menu Events extension to learn
  140. more about the Apple event syntax for Menu events.)
  141.  
  142. In order for Menu events to work across an AppleTalk network, the target
  143. machine and application must meet the following conditions:
  144. ・  program linking started in Sharing Setup control panel
  145. ・  program linking allowed to user or guest through Users & Groups
  146. control panel
  147. ・  remote program linking allowed through applicationユs Sharing dialog
  148. ・  Menu Events extension installed
  149.  
  150. NOTE (technical, but important):  Even with remote program linking
  151. allowed, most applications run in a mode where they will not permit user
  152. interaction in response to an event from another machine.  Menu Events
  153. always requests user interaction to make the target application active, as
  154. it would normally be when it senses a menu selection.  Menu Events is
  155. programmed to overcome this problem.  If you want to allow remote Menu
  156. events (such as sent by Menu Grabber) to work on applications running in
  157. the default kAEInteractWithLocal interaction mode, leave Menu Events
  158. unlocked.  Otherwise, lock it using the Get Info dialog, so that applications
  159. can decide for themselves whether to allow remote control.  This choice
  160. does not affect the acceptance of Menu events by applications which are
  161. running in the kAEInteractWithSelf (always reject) or kAEInteractWithAll
  162. (always accept) interaction mode.
  163.  
  164. After installing the Menu Events extension on the target machine, you
  165. must restart that machine to enable support for Menu events.  An icon
  166. appears at startup to confirm that the extension has initialized
  167. successfully.  The icon includes a little padlock if Menu Events has been
  168. locked against remote senders.
  169.  
  170.  
  171. Selecting a Target Application
  172.  
  173. Once you have installed the Menu Events extension on the target machine,
  174. you are ready to try Menu Grabber.  You may decide to run Menu Grabber
  175. on the same machine, as a first test, but to be certain that Menu events
  176. will work for a certain target application across the network, you should
  177. also try grabbing its menus from another machine.
  178.  
  179. To grab an applicationユs menus, click the Grabノ button in the Menu
  180. Grabber dialog, then select the zone, machine, and application you want.
  181. If the machineユs name does not appear, check that it is connected to the
  182. network, and that program linking is started.  If the applicationユs name
  183. does not appear, check that it is open, and that remote program linking is
  184. allowed in its Sharing dialog.  If you have to turn on remote program
  185. linking, you must quit the application first.  If the check box remains
  186. grayed out after quitting the application, and the application is neither
  187. locked nor on an unwritable volume, it is likely that the application is not
  188. high-level-event-aware ム in other words, it doesnユt support program
  189. linking, and canユt be controlled by Menu Grabber.
  190.  
  191. Unfortunately, some applications, such as any version of Finder which
  192. predates Power Macintosh (version 7.1.2), are programmed in such a
  193. way as to ignore high-level events which they do not understand, such as
  194. Menu events.  If it seems to be taking a long time to grab the applicationユs
  195. menus, you can wait 30 seconds for the attempt to time out, or press
  196. Command-Period to cancel the attempt.  A few other applications
  197. (Microsoftユs, especially) actively prevent system event handlers from
  198. working; you will recognize them by the error message, メThe target
  199. application has prevented the usual handling of the Menu event.  Menu
  200. events should not be used with this application.モ
  201.  
  202. If all goes well, the Menu Grabber dialog changes to show that it has
  203. grabbed the applicationユs menus, and the menu bar changes to match.  If
  204. you are using a color display, the menu bar turns red, and all grabbed
  205. menus have white titles and white-on-black items, to make it obvious that
  206. these are not Menu Grabberユs own menus.
  207.  
  208. Some applications portray their menus differently depending on whether
  209. or not you press modifier keys (Shift, Control, Option, Command) when
  210. you click in the menu bar.  Any modifier keys you press while clicking the
  211. Grabノ button are applied when grabbing the target applicationユs menus,
  212. and also when you select items from the grabbed menus.  The dialog shows
  213. which modifiers are in effect.
  214.  
  215. To select another application, repeat the procedure.  To refresh your
  216. view of the target applicationユs menus, click the Refresh button, with or
  217. without modifier keys.  To revert to Menu Grabberユs own menus, click the
  218. Revert button, or press Escape or Command-Period.
  219.  
  220.  
  221. Using Grabbed Menus
  222.  
  223. Having grabbed the menus of a target application, you can control that
  224. application by pulling down menus and selecting menu items from within
  225. Menu Grabber.  If you have pressed any modifier keys (Shift, Control,
  226. Option, Command), and the target machine is running Menu Events version
  227. 1.1.2 or later, these modifiers are applied to the menu selection, along
  228. with any modifiers which were pressed when the menus were grabbed.
  229. Meanwhile, the target application and its menus continue to work as usual.
  230.  
  231. Menu Grabber faithfully reproduces standard hierarchical (cascade)
  232. menus, Command-key shortcut equivalents, bullets and check marks, and
  233. styles such as underlining and italics.  It does not reproduce icons
  234. attached to menu items.  If it encounters a non-standard menu (one which
  235. uses a menu definition procedure other than the standard system 'MDEF'),
  236. it substitutes a menu containing a grayed-out item saying メnon-standard
  237. menu,モ because Menu Grabber does not have access to that function.  If a
  238. menu is unavailable for any reason, you will see a similar メunavailable
  239. menuモ indication.  Keyboard, Help, and Application menus are never
  240. grabbed; selecting an item from these menus does not cause a Menu event
  241. to be sent to the target application.
  242.  
  243. Menu Grabber adds an extra disabled item to the bottom of each grabbed
  244. menu, to show the menu ID.  This may help you if you are writing a
  245. program or script to send a Menu event to the application.
  246.  
  247. The reproduction of the target applicationユs menu bar is static.  If you
  248. need to bring it up to date, because menus may have been added or
  249. deleted, or items enabled or disabled, you must refresh the menu bar by
  250. clicking the Refresh button.
  251.  
  252.  
  253.  
  254. Suggestions for Use
  255.  
  256.  
  257. Menu Grabber is distributed as part of a free set of cooperating
  258. programs, AWOL Utilities.  This section explains how Menu Grabber can
  259. work in conjunction with the other programs.
  260.  
  261.  
  262. Help on Wheels
  263.  
  264. Help on Wheels is an efficient and full-featured help server which displays
  265. help files on behalf of client applications.  The help file you are reading is
  266. distributed alongside the Menu Grabber application file as a separate Help
  267. on Wheels document.
  268.  
  269. You can read this help at any time while using Menu Grabber, either by
  270. selecting メMenu Grabber Helpモ from the Help menu, or by pressing the
  271. Help or Command-? key.  This version of Menu Grabber has some support
  272. for the sophisticated features of Help on Wheels, such as
  273. context-sensitivity, casual displays, and メhotモ hypertext buttons.
  274.  
  275.  
  276.  
  277. Dialogs
  278.  
  279.  
  280. Menu Grabber has one dialog, to show its status.
  281.  
  282.  
  283. The Status Dialog
  284.  
  285. This dialog is present at all times while Menu Grabber is running.  When it
  286. is asking you to click a button to select a target application, it is operating
  287. under its own menus.
  288.  
  289. When you have selected a target application, and Menu Grabber is trying
  290. to grab its menus, the dialog suggests that you can press Command-Period
  291. to cancel the attempt.  Across a network, it may take up to 15 seconds to
  292. grab an applicationユs menus; some applications may never respond.  Menu
  293. Grabber will wait 30 seconds before giving up.
  294.  
  295. When it has grabbed an applicationユs menus, the dialog shows which
  296. application.
  297.  
  298. NOTE:  To quit Menu Grabber, you can click the close box, or revert to
  299. Menu Grabberユs own menus, then select Quit from the File menu or press
  300. Command-Q.  If you press Command-Q while grabbing, you will probably
  301. cause the target application to quit, not Menu Grabber!
  302.  
  303. ・  Grabノ
  304.  
  305. Click here to bring up the program selection dialog, so that you can select
  306. an application for menu grabbing.  If you are currently grabbing an
  307. applicationユs menus, this releases them.  Pressing the Return or Enter key
  308. is equivalent.
  309.  
  310. ・  Refresh
  311.  
  312. Click here to refresh your view of the target applicationユs menus.  This
  313. button is not available when Menu Grabber is operating under its own
  314. menus.
  315.  
  316. ・  Revert
  317.  
  318. Click here to revert to Menu Grabberユs own menus, releasing those
  319. previously grabbed.  This button is not available when Menu Grabber is
  320. operating under its own menus.  Pressing the Escape or Command-Period
  321. key is equivalent.
  322.  
  323.  
  324. The About Dialog
  325.  
  326. This dialog presents Menu Grabberユs About box.  It is opened by the
  327. メAbout Menu Grabberノモ command in the Apple menu.
  328.  
  329. It mentions, by way of a balloon, that Menu Grabber offers help through
  330. both Balloon Help and Help on Wheels.  If you already have balloons
  331. showing, Menu Grabber spares you the balloon, figuring that youユve
  332. probably seen enough recently.
  333.  
  334.  
  335.  
  336. Menus
  337.  
  338.  
  339. This section describes each of Menu Grabberユs menus.
  340.  
  341. On a color display, when Menu Grabber is grabbing the menu bar of
  342. another application, its menu bar turns red to warn you that any menu
  343. action will affect that application.  Grabbed menus have white titles and
  344. white-on-black items, as shown in the picture above.  The Keyboard,
  345. Help, and Application menus are not affected by grabbing, and retain their
  346. usual colors.
  347.  
  348. Menu Grabber adds an extra disabled item to the bottom of each grabbed
  349. menu, to show the menu ID.
  350.  
  351. The rest of this section describes the menus which appear before you
  352. first grab an applicationユs menus, or after you revert.  At other times,
  353. when you are grabbing, these menus are not available, except for the Help
  354. menu, which never changes.
  355.  
  356.  
  357. The Apple Menu
  358.  
  359. ・  About Menu Grabberノ
  360.  
  361. This command opens Menu Grabberユs About dialog, which invites you to
  362. try Balloon Help or Help on Wheels to learn more about Menu Grabber.
  363.  
  364.  
  365. The File Menu
  366.  
  367. ・  Quit (Command-Q)
  368.  
  369. This command quits Menu Grabber.
  370.  
  371.  
  372. The Edit Menu
  373.  
  374. ・  Undo (Command-Z)
  375.  
  376. This command is not used by Menu Grabber.  It is present only for desk
  377. accessories.
  378.  
  379. ・  Cut (Command-X)
  380.  
  381. This command cuts selected text to the clipboard.  It is used only with
  382. desk accessories.
  383.  
  384. ・  Copy (Command-C)
  385.  
  386. This command copies selected text to the clipboard.  It is used only with
  387. desk accessories.
  388.  
  389. ・  Paste (Command-V)
  390.  
  391. This command inserts the contents of the clipboard at the current cursor
  392. location or replaces the currently selected text by the contents of the
  393. clipboard.  It is used only with desk accessories.
  394.  
  395. ・  Clear
  396.  
  397. This command clears the selected text in a desk accessory.
  398.  
  399.  
  400. The Help Menu
  401.  
  402. ・  About Balloon Helpノ
  403.  
  404. This command, supplied by System software, tells you how to use Balloon
  405. Help.  Menu Grabber supports Balloon Help.
  406.  
  407. ・  Show/Hide Balloons
  408.  
  409. This command, supplied by System software, lets you turn Balloon Help
  410. on and off.  Menu Grabber supports Balloon Help.
  411.  
  412. ・  Menu Grabber Help
  413.  
  414. This command asks Help on Wheels to display Menu Grabberユs help file.
  415. This will start the help server if it was not already running.  If the help
  416. server cannot be found on any mounted volume, Menu Grabber will offer
  417. to save a readable copy of the help file as a TeachText file, then ask
  418. Finder to open the file.  If the help file is missing or invalid, this command
  419. is disabled.
  420.  
  421. Pressing the Help or Command-? key at any time does the same thing.
  422. When there is a modal dialog box on your screen, the menu command is
  423. disabled, and the keyboard is the only way to display help.
  424.  
  425.  
  426.  
  427. Limitations
  428.  
  429.  
  430. Menu Grabber inherits the limitations of the Menu Events extension.  Menu
  431. events work only if the target application is programmed according to the
  432. customary rules about handling of high-level events and reacting to clicks
  433. in the menu bar.  Some of the big-name applications are among the
  434. exceptions to these standards, including Finder 7.0 or 7.1 (totally
  435. unwilling, but fortunately it has its own suite of Apple events; 7.1.2 or
  436. later will work), ResEdit 2.1.1 (nothing good to say about its Apple event
  437. handling), and most Microsoft applications (they install a handler over all
  438. Apple event classes, which doesnユt return errAEEventNotHandled when
  439. itユs supposed to).
  440.  
  441. If the menu item you select brings up a dialog box, that dialog will be on
  442. the target machine, so if that machine is unattended, you may have a
  443. problem.
  444.  
  445. If the target machine is under the influence of a screen saver or security
  446. package which would present a modal dialog in response to a mouse click,
  447. then you will not be able to grab menus.  The same is true if the target
  448. machine is already showing a modal dialog, preventing Menu Events from
  449. activating the target application.
  450.  
  451. Menu Grabber presumes that all hierarchical (cascade) menus are
  452. standard, so they may sometimes look odd.
  453.  
  454. If you are also using the help server Help on Wheels, you should read the
  455. Menu Events help file for information about a conflict between the two
  456. which can cause the target application to hang.
  457.  
  458.  
  459.  
  460. Programmer Notes
  461.  
  462.  
  463. If you are interested in scripting, you should find out how to use Menu
  464. events to control non-scriptable applications through their menus, making
  465. them scriptable and recordable.  The Menu Events distribution includes a
  466. scripting addition ('osax') and a sample script to get you started.
  467.  
  468. The Menu Events extension, by itself, can support Menu events without
  469. any scripting package.
  470.  
  471. Write to the author at the above address if you want to know more about
  472. the Menu Events extension or how Menu Grabber was programmed.
  473.  
  474.  
  475.  
  476. Acknowledgements
  477.  
  478.  
  479. Thanks to C.K. Haun and the other folks at Apple Developer Technical
  480. Support who put together those clever little code snippets which give
  481. folks like me such odd ideas.
  482.  
  483. One big hug to Toni and the family for enduring a LOT of late nights.
  484.  
  485. Special thanks to the 170 fine people who beta-tested this software, and
  486. to others who provided useful information.
  487.  
  488.  
  489.  
  490. Revision History
  491.  
  492.  
  493. 1.3 (March 6, 1996)
  494. ・  Public AWOL Utilities 1.3 release.
  495. ・  Added support for modifier keys pressed while grabbing menus, so that
  496. you can see menu items in their alternate form.  These modifiers are also
  497. applied when you select items from the grabbed menus.  The dialog shows
  498. which modifiers are in effect.
  499. ・  Added the Refresh button to make it easier to work continuously with
  500. the same target application.
  501. ・  Fixed a memory leak which could cause Menu Grabber to crash after a
  502. large number of grabs.
  503.  
  504. 1.2 (October 17, 1994)
  505. ・  Public AWOL Utilities 1.2 release.
  506. ・  Corrected a conflict with the MenuChoice utility which caused a failure
  507. to grab menus.
  508. ・  Made Menu Grabber compatible with versions of Menu Events prior to
  509. 1.1.2.
  510. ・  Improved the message given when the target application cannot be
  511. found.
  512. ・  Improved handling of programs listed in the program selection dialog
  513. which are not applications.
  514.  
  515. 1.1.2 (April 19, 1994)
  516. ・  Modifier keys (Shift, Control, Option, Command) are now effective on
  517. every menu selection where the target machine has Menu Events version
  518. 1.1.2 or later.
  519. ・  Changed handling of non-standard menus to accommodate revisions in
  520. Menu Events version 1.1.2.
  521.  
  522. 1.1.1 (April 11, 1994)
  523. ・  Document addition of scripting files to Menu Events 1.1.1 distribution.
  524.  
  525. 1.1 (March 28, 1994)
  526. ・  Public AWOL Utilities 1.1 release.
  527. ・  Corrected a bug which could cause the Grabノ button to become
  528. unavailable.
  529. ・  Documented that Menu Grabber works with Finder 7.1.2.
  530.  
  531. 1.0.6 (March 13, 1994)
  532. ・  Some minor documentation changes.
  533. ・  Added the thank-you hot button under Acknowledgements.
  534.  
  535. 1.0.5 (February 27, 1994)
  536. ・  Corrected an incompatibility with SpeedyFinder7ユs Help menu removal
  537. option which prevented help display.
  538. ・  メTrying to grabモ message now suggests Command-Period to cancel.
  539. ・  Allowed the application to operate without a preferences file (for
  540. example, when startup disk is locked).
  541.  
  542. 1.0.4 (February 6, 1994)
  543. ・  Removed mention of Menu Events bug fixed in version 1.0.5.
  544.  
  545. 1.0.3 (February 1, 1994)
  546. ・  Changed color of Menu Grabber menu bar and menu titles when
  547. grabbing, to warn user that any menu action will affect another
  548. application.
  549.  
  550. 1.0.2 (January 11, 1994)
  551. ・  Removed mention of Menu Events bug fixed in version 1.0.2.
  552. ・  Added disabled メmenu ID #モ items to grabbed menus, to help users who
  553. want to script Menu events.
  554.  
  555. 1.0.1 (December 31, 1993)
  556. ・  Initial AWOL Utilities 1.0.1 release.
  557.